package com.ebupt.migu.music.util.enumeration;

/**
 *公播平台标签客群 redis拼接字符串枚举类
 */
public enum BroadcastCustomerTagEnum {
    //店铺
    store("1","store"),
    //音乐馆
    playList("2","playList"),
    //语音播报
    broadcastTab("3","broadcastTab"),
    //资费
    serviceInfo("4","serviceInfo");


    private String tagModule;

    private String redisStr;

    private BroadcastCustomerTagEnum(String tagModule, String redisStr) {
        this.tagModule = tagModule;
        this.redisStr = redisStr;
    }

    public String getTagModule() {
        return tagModule;
    }

    public void setTagModule(String tagModule) {
        this.tagModule = tagModule;
    }

    public String getRedisStr() {
        return redisStr;
    }

    public void setRedisStr(String redisStr) {
        this.redisStr = redisStr;
    }

    public static BroadcastCustomerTagEnum getByTagModule(String tagModule) {

        BroadcastCustomerTagEnum result = null;

        for (BroadcastCustomerTagEnum s : values()) {
            if (s.getTagModule().equals(tagModule)) {
                result = s;
                break;
            }
        }

        return result;
    }

    public static BroadcastCustomerTagEnum getByRedisStr(String redisStr) {

        BroadcastCustomerTagEnum result = null;

        for (BroadcastCustomerTagEnum s : values()) {
            if (s.getRedisStr().equals(redisStr)) {
                result = s;
                break;
            }
        }

        return result;
    }
}
